package cn.ratel.db.ds;

import com.alibaba.druid.pool.DruidDataSource;

import javax.sql.DataSource;

public class DruidDataSourceProvider implements DataSourceProvider {
	DruidDataSource ds;

	public DruidDataSourceProvider(String url, String username, String password, String driver) {
		ds = new DruidDataSource();
		ds.setUrl(url);
		ds.setUsername(username);
		ds.setPassword(password);
		ds.setDriverClassName(driver);
	}

	@Override
	public DataSource getDataSource() {
		return ds;
	}
}
